
'use strict';
module.exports = app => {
  const DataTypes = app.Sequelize;
  const { STRING, INTEGER, BIGINT } = DataTypes;
  // app.model.define("对应的表头",{字段},{其他配置})
  const Model = app.model.define('field', {
    // 字段映射
    fieldid: {
      type: INTEGER,
      primaryKey: true, // 是否是主键
      autoIncrement: true, // 是否自增
      allowNull: false, // 是否允许为null
    },
    fieldAdress: STRING,
    fieldname: STRING,
    suitable: STRING,
    introduce: STRING,
    fieldType: STRING,
    fieldTime: BIGINT,
    uid: INTEGER,
    browse: INTEGER,
  }, {
    timestamps: false,
    // 配置项
  });
  return Model;
};
